<?php

class AppController extends Controller {

	public $components 	= array('RequestHandler','Auth', 'Acl', 'Session');
	public $layout		= "json/ajax";
	public $helpers 	= array('Javascript', 'Ajax');
	
	protected $retorno	= null;
	
	public function beforeFilter() {
		
        if (isset($this->Auth)) 
            $this->Auth->loginAction = '/login';            
        
		$this->retorno=new Object();
		
		if ($this->RequestHandler->requestedWith('json')) {
			$parametros=json_decode(file_get_contents('php://input'));
    		$this->data=$parametros->data;
		}		
	}
	}